#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>;
using namespace std;

class stack
{
public:
	stack(int n = 4)
	{
		a = (int*)malloc(n * sizeof(int));
		//a = (int*)realloc(a,n * sizeof(int));
		if (a == nullptr)
		{
			perror("realloc fail");
			return;
		}
		size = 0;
		capacity = n;
	}
	void pushback(int x)
	{
		a[size] = x;
		size++;
	}
private:
	int* a;
	int size;
	int capacity;
};
int main()
{
	stack s1;

	return 0;
}
